package Application.FirstApplication.xmlPrase
{
	import Application.FirstApplication.def.Manager;
	
	public class SourceXML
	{
		private var _data : Object;
		
		public function SourceXML()
		{
		}
		
		public function prase() : void
		{
			_data = new Object;
			
			var orgXML : XML = Manager.Source.getXML("source");
			
			for each(var element:XML in orgXML.elements("item"))
			{
				var objInfo : Object = new Object;
				objInfo["id"] = element.@id.toString();
				objInfo["url"] = element.@url.toString();
				
				_data[objInfo["id"]]=objInfo;
			}
			
		}
		
		public function get Data() : Object
		{
			return _data;
		}
		
		public function  getUrl(id:String):String
		{
			return _data[id]["url"];
		}
	}
}